package com.atguigu.gmall.product;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * 没有写过任何一个feign
 */
@EnableFeignClients(basePackages = {"com.atguigu.gmall.feign.list"})  //开启远程feign
@MapperScan(basePackages = "com.atguigu.gmall.product.mapper") //扫描mapper接口
@SpringCloudApplication
public class ProductMainApplication {

    public static void main(String[] args) {
        SpringApplication.run(ProductMainApplication.class, args);

//        Thread thread = new Thread(() -> {
//            while (true) {
//                try {
//                    TimeUnit.SECONDS.sleep(1);
//                    System.out.println("我还在...");
//                } catch (InterruptedException e) {
//                    e.printStackTrace();
//                }
//
//            }
//        });
//        thread.setDaemon(true);
//        thread.start();
//
//        System.out.println("主线程....");
//        try {
//            TimeUnit.SECONDS.sleep(10);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
//        System.out.println("主线程....结束...");
    }
}
